import 'react-native-gesture-handler';
import {QueryClientProvider} from '@tanstack/react-query';
import {GluestackUIProvider} from "@gluestack-ui/themed"
import ApplicationNavigator from './navigators/Application';
import './translations';
import {config} from "@/theme/gluestack-ui.config";
import Toast from 'react-native-toast-message';
import {Spinner} from "@/components/k-view";
import {GestureHandlerRootView} from 'react-native-gesture-handler';
import {queryClient} from "@/services/instance";

function App() {
    //
    return (
        <GestureHandlerRootView style={{flex: 1}}>
            <GluestackUIProvider config={config}>
                <QueryClientProvider client={queryClient}>
                    <ApplicationNavigator/>
                    <Spinner/>
                    <Toast
                        position='bottom'
                        bottomOffset={40}
                    />
                </QueryClientProvider>
            </GluestackUIProvider>
        </GestureHandlerRootView>

    );
}

export default App;
